<template>
  <div>
    <nav-bar class="category-nav">
      <div slot="center">商品分类</div>
    </nav-bar>
    <DivBox :cateList="cateList" />

  </div>
</template>

<script>
import NavBar from 'components/common/navbar/NavBar'

import DivBox from "./childComps/DivBox.vue"
import { getCategory } from 'network/category'
// import BScroll from 'better-scroll'
export default {
  components: {
    NavBar,
    DivBox,
  },
  data () {
    return {
      cateList: [],
      goodsTitle:[]
    }
  },
  name: "Category",
  created () {
    //加载数据
    getCategory().then(res => {
      console.log(res, 'dategory');
      this.cateList = res.data.category.list
      
      console.log(this.cateList);
    })

  }
}
</script>

<style scoped>
.category-nav {
  background-color: var(--color-tint);
  color: #fff;
}
</style>
